<?php

namespace App\Transformers;

use App\Models\ExchangeRate;

class ExchangeRateTransformer extends BaseTransformer
{
    public function transform(ExchangeRate $model)
    {
        return [
            'id' => $model->id,
            'currency' => $model->currency,         #货币
            'exchange_rate' => $model->exchange_rate,        #汇率
            'created_at' => $model->created_at->toDateTimeString(),
        ];
    }
}
